﻿<?
error_reporting(0);
include("../config/header.php");
?>
<script type='text/javascript'>
	document.title = '个人js加解密功能页面 —— 在线工具';
</script>
<style>
.container{width:1300px;}
</style>
<script type='text/javascript' src="../content/js/moneyen.min.js"></script>
<div class="container">
	<div class="panel panel-primary">
		<div class="panel-heading"><h3 class="panel-title">个人js加解密功能页面</h3></div>
	</div>
	<div class="form-group">
		<button onclick="colorpicker()" class="button button-rounded button-flat">颜色选择</button>
		<button onclick="press();" class="button button-rounded button-flat">代码缩进</button>
		<button onclick="printit();" class="button button-rounded button-flat">ASCII码表</button>
		<button onclick="keydown();" class="button button-rounded button-flat">键值响应</button>
		<button onclick="runCode();" class="button button-rounded button-flat">运行代码</button>
		<button onclick="copyCode(txt);" class="button button-rounded button-flat">复制代码</button>
		<button onclick="saveCode(txt);" class="button button-rounded button-flat">另存代码</button>
		<button onclick="txt.value=''" class="button button-rounded button-flat">内容清空</button>
		<button onclick="DelSpace();" class="button button-rounded button-flat">去除空格</button>
		<button onclick="alert(txt.value.length)" class="button button-rounded button-flat">字数统计</button>
		<button onclick="try{txt.value=txt.value+'='+eval(txt.value)}catch(e){alert('公式错误')};" class="button button-rounded button-flat">计算器</button>
	</div>
	<div class="form-group row row-offcanvas row-offcanvas-right">
		<div class="col-xs-12 col-sm-9">
			<textarea id="txt" name="txt" style="width:100%;height:600px;border:1px solid #c5e2f2;overflow:visible;"></textarea><hr/>
			<textarea id="remark" name="remark" style="width:100%;height:250px;border:1px solid #c5e2f2;overflow:visible;">实例</textarea>
		</div><!-- ../ -->
		<div class="col-xs-6 col-sm-3 sidebar-offcanvas">
			<div class="form-group">
				<button onmousedown="msg(10)" onclick="Encrypt();" class="btn btn-flat">10进制加密</button><=>
				<button onmousedown="msg(10)" onclick="Decrypt();" class="btn btn-flat">10进制解密</button><br/>
				<input type="checkbox" id="Decimal1" name="Decimal1" value="checkbox"/> 选中“&#;”；默认“,”<br/>
				<input type="checkbox" id="Decimal2" name="Decimal2" value="checkbox" /> 选中“&#”
			</div><!-- ../ -->
			<div class="form-group">
				<button onmousedown="msg(16)" onclick="JavaEn();" class="btn btn-flat">16进制加密</button><=>
				<button onmousedown="msg(16)" onclick="JavaDe();" class="btn btn-flat">16进制解密</button><br/>
				<input type="checkbox" id="hex1" name="hex1" value="checkbox" /> 选中"\u"(双字节)；默认"\"(单字节)<br/>
				<input type="checkbox" id="hex2" name="hex2" value="checkbox" /> 选中"&#x;"<br/>
				<input type="checkbox" id="hex3" name="hex3" value="checkbox" /> 选中"\x"
			</div><!-- ../ -->
			<div class="form-group">
				<button onmousedown="msg(8)" onclick="EnEight();" class="btn btn-flat">8进制加密</button><=>
				<button onmousedown="msg(8)" onclick="DeEight();" class="btn btn-flat">8进制解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="EnChTo(16);" class="btn btn-flat">任意转16进制</button>
				<button onclick="DeChTo(16);" class="btn btn-flat">解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="EnChTo(10);" class="btn btn-flat">任意转10进制</button>
				<button onclick="DeChTo(10);" class="btn btn-flat">解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="EnChTo(8);" class="btn btn-flat">任意转8进制</button>
				<button onclick="DeChTo(8);" class="btn btn-flat">解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="EnChTo(2);" class="btn btn-flat">任意转2进制</button>
				<button onclick="DeChTo(2);" class="btn btn-flat">解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="ChSpace();" class="btn btn-flat">替换字符</button><br/><br/>
				替换<input type="text" name="front1" id="front1" style="width:40px;" size="2" value="">为<input type="text" name="behind1" id="behind1" style="width:40px;" size="2" value="">(前)字符(后)<input type="text" name="behind2" id="behind2" style="width:40px;" size="2" value="">
			</div><!-- ../ -->
			<div class="form-group">
				<button onmousedown="msg(20)" onclick="txt.value=escape(txt.value)" class="btn btn-flat">Escape加密</button><=>
				<button onmousedown="msg(20)" onclick="txt.value=unescape(txt.value);" class="btn btn-flat">Unescape解密</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="txt.value=encodeURI(txt.value);" class="btn btn-flat">UrlEncode</button><=>
				<button onclick="txt.value=decodeURI(txt.value);" class="btn btn-flat">UrlDecode</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="HtmlToJs(1);" class="btn btn-flat">HtmlToJs</button><=>
				<button onclick="HtmlToJs(2);" class="btn btn-flat">JsToHtml</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onmousedown="msg(21)" onclick="HtmlEncode(1);" class="btn btn-flat">HtmlEncode</button><=>
				<button onmousedown="msg(21)" onclick="HtmlEncode(2);" class="btn btn-flat">HtmlDecode</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="txt.value=txt.value.toUpperCase();" class="btn btn-flat">小写转大写</button>
				<button onclick="txt.value=txt.value.toLowerCase();" class="btn btn-flat">大写转小写</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="txt.value=calcMD5(txt.value);" class="btn btn-flat">MD5加密</button>
				<input type="text" name="search1" id="search1" style="width:80px;" onfocus="this.value=''" size="10"  value="">
				<button onclick="search(search1.value);" class="btn btn-flat">搜索</button>
			</div><!-- ../ -->
			<div class="form-group">
				<button onclick="txt.value=base64encode(utf16to8(txt.value));" class="btn btn-flat">base64encode</button>
				<button onclick="txt.value=utf8to16(base64decode(txt.value));" class="btn btn-flat">base64decode</button>
			</div><!-- ../ -->
		</div>
	</div>
</div>
<?php
include("../config/footer.php");
?>